package com.example.demo.edu.Controller;

import com.example.demo.edu.bean.EduTeacher;
import com.example.demo.edu.service.EduTeacherMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("nihao")
public class EduTeacherContoller {
    private EduTeacherMapperService eduTeacherMapperService;
    @Autowired
    public void setEduTeacherMapperService(EduTeacherMapperService eduTeacherMapperService) {
        this.eduTeacherMapperService = eduTeacherMapperService;
    }

    @RequestMapping("a")
    public String an(Map<String,List<EduTeacher>> map) {

        List<EduTeacher> eduTeachers = eduTeacherMapperService.selectAll();
       map.put("employ",eduTeachers);
        return "nihaowa";
    }
}
